package com.cgbl.cg.ui.mine

import android.os.Bundle
import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.LinearLayoutManager
import com.alibaba.android.arouter.facade.annotation.Route
import com.cgbl.cg.BR
import com.cgbl.cg.R
import com.cgbl.cg.adapter.SystemNotificationAdapter
import com.cgbl.cg.databinding.AppActivitySystemNotificationBinding
import com.cgbl.cg.databinding.AppActivityWithdrawProfileBinding
import com.cgbl.cg.vm.mine.SystemNotificationViewModel
import com.cgbl.cg.vm.mine.WithdrawViewModel
import com.robot.base.base.activity.GLBaseActivity
import com.robot.base.configs.AppConstants

@Route(path = AppConstants.Router.Mine.A_MINE_SYSTEM_NOTIFICATION)
class SystemNotificationActivity :
    GLBaseActivity<AppActivitySystemNotificationBinding, SystemNotificationViewModel>() {

    private lateinit var systemNotificationAdapter: SystemNotificationAdapter

    override fun initComponents() {
        initTiterBar()
        initView()
    }

    private fun initTiterBar() {
        val titleView = findViewById<TextView>(R.id.tv_title)
        val backView = findViewById<ImageView>(R.id.iv_back)
        titleView.text = "系统通知"
        backView.setOnClickListener { finish() }
    }

    private fun initView() {
        systemNotificationAdapter = SystemNotificationAdapter()
        binding.recyclerView.apply {
            layoutManager = LinearLayoutManager(this@SystemNotificationActivity)
            adapter = systemNotificationAdapter
        }
        systemNotificationAdapter.setNewInstance(mutableListOf("", ""))
    }

    override fun initContentView(savedInstanceState: Bundle?): Int =
        R.layout.app_activity_system_notification

    override fun initVariableId(): Int = BR.viewModel
}